package com.cheng.cms.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Property_fee {
    private String buildingNo;
    private String roomNo;
    private String year;
    private String month;
    private String propertyFee;
    private String whether;
    private Date feeDate;
    private String peoName;
    private String odd;
    private int dateID;

    public String getFeeDate() {
        if(feeDate == null){
            return "无";
        }
        Date currentTime = feeDate;
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        String dateString = formatter.format(currentTime);
        return dateString;
    }

    public String getOdd(){
        if(odd == null){
            return "无";
        }else {
            return odd;
        }
    }

    public String getPeoName(){
        if(peoName == null){
            return "无";
        }else {
            return peoName;
        }
    }
}
